import React from "react";
import ReactDOM from "react-dom";
import {Provider} from "react-redux";
import store from "./store";
import {Home,About,Navigator,Product,Carts,Productdetails} from "./components";
import {Counter} from "./containt";
import "./main.css";
import 'antd/dist/antd.css';
import {HashRouter as Router,Route,Switch} from "react-router-dom";
class Index extends React.Component {
    render(){
        return(
          <Router>
              <div>
                <Navigator/>
                <Switch>
                    <Route path="/" component={Home} exact/>
                    <Route path="/product/:id" component={Productdetails}/>
                    <Route path="/product" component={Product}/>
                    <Route path="/about" component={About}/>
                    <Route path="/carts" component={Carts}/>
                    <Route path="/counter" component={Counter}/>
                </Switch>
               </div>
          </Router>
        )
    }
}

ReactDOM.render(
    <Provider store={store}>
        <Index/>
        </Provider>
   ,document.getElementById('app')
    )
